home *** CD-ROM | disk | FTP | other *** search
/ Apple Developer Connection Student Program / ADC Tools Sampler CD Disk 3 1999.iso / Metrowerks CodeWarrior / Java Support / Java_Source / IFC_112 / netscape / application / ModalDialogManager.java < prev    next >
Encoding:
Text File  |  1999-05-28  |  706 b   |  31 lines  |  [TEXT/CWIE]

  1. // ModalDialogManager.java
  2. // By Ned Etcode
  3. // Copyright 1996, 1997 Netscape Communications Corp.  All rights reserved.
  4.  
  5. package netscape.application;
  6.  
  7. /*
  8.  * ModalWindow.show blocks on win32 but not on unix
  9.  * This class uses a thread to bring the modal window
  10.  * to the front. This is to avoid having our main thread
  11.  * blocking
  12.  */
  13. class ModalDialogManager implements Runnable {
  14.     private java.awt.Dialog modalDialog;
  15.  
  16.     ModalDialogManager( java.awt.Dialog aModalDialog) {
  17.         super();
  18.         modalDialog = aModalDialog;
  19.     }
  20.  
  21.     void show() {
  22.         Thread thread;
  23.         thread = new Thread(this);
  24.         thread.start();
  25.     }
  26.  
  27.     public void run() {
  28.         modalDialog.show();
  29.     }
  30. }
  31.